package sdkshell.kuaiyan.com.kuaiyansdk.http.httpIpm;
import android.content.Context;
import java.util.HashMap;
import java.util.Map;

import sdkshell.kuaiyan.com.kuaiyansdk.http.Ihttp.ExceptionConfig;
import sdkshell.kuaiyan.com.kuaiyansdk.http.Ihttp.NetBuilderConfig;
import sdkshell.kuaiyan.com.kuaiyansdk.http.Ihttp.NetConfig;
import sdkshell.kuaiyan.com.kuaiyansdk.http.enums.RequestType;
/**
 * Created by Max on 2016/6/27.
 */
public abstract class NetBuildConfigImp implements NetBuilderConfig {
    private Context context;
    private String url = null;
    private RequestType type = RequestType.GET;
    private Map<String,String> heads = new HashMap<>();
    private ExceptionConfig exceptionConfig;
    private NetConfig netConfig;
    public Map<String, String> getParams() {
        return params;
    }
    @Override
    public ExceptionConfig getExceptionConfig() {
        return exceptionConfig;
    }



    @Override
    public NetConfig getNetConfig() {
        return netConfig;
    }

    private Map<String,String> params = new HashMap<>();
    public RequestType getType() {
        return type;
    }

    public NetBuildConfigImp(final Context context){
        netConfig = new NetConfigImp(context);
        exceptionConfig = new ExceptionConfigImp();

    }



    @Override
    public NetBuilderConfig initExptionConfig(ExceptionConfig exceptionConfig) {
        this.exceptionConfig = exceptionConfig;
        return this;
    }

    @Override
    public NetBuilderConfig initNetConfig(NetConfig netConfig) {
        this.netConfig = netConfig;
        return this;
    }

}
